<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});

Route::get('/','QuestionController@index');

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');


Route::resource('/question', 'QuestionController');

Route::get('email/verify/{token}', ['as' => 'email.verify', 'uses' => 'EmailController@verify']);

Route::post('question/{question}/answer', 'AnswersController@store');

Route::get('question/{question}/follow', 'QuestionFollowController@follow');

Route::get('notifications', 'NotificationsController@index');


Route::get('avatar', 'UserController@avatar');
Route::post('avatar','UserController@changeAvatar');

Route::get('password', 'UserController@password');
Route::post('password/update', 'UserController@passwordUpdate');

Route::get('setting','SettingsController@index');
Route::post('setting','SettingsController@store');

Route::get('inbox','InboxController@index');
Route::get('inbox/{userId}','InboxController@show');
